<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<{include file='backend/lib/meta.html'}>
<link rel="stylesheet" type="text/css" href="public/theme/backend/css/verydows.css" />
<link rel="stylesheet" type="text/css" href="public/theme/backend/css/main.css" />
<script type="text/javascript" src="public/script/jquery.js"></script>
<script type="text/javascript" src="public/theme/backend/js/verydows.js"></script>
<script type="text/javascript" src="public/theme/backend/js/list.js"></script>
</head>
<body>
<div class="content">
  <div class="loc"><h2><i class="icon"></i>优惠券列表</h2></div>
  <div class="box">
    <div class="doacts">
      <a class="ae add btn" href="<{url m=$MOD c='goods_cate' a='voucheradd'}>"><i></i><font>新增优惠券</font></a>
      <a class="ae btn" onclick="doslvent('<{url m=$MOD c='goods_cate' a='voucheredit'}>', 'id')"><i class="edit"></i><font>编辑</font></a>
      <a class="ae btn" onclick="doslvent('<{url m=$MOD c='goods_cate' a='voucherdelete'}>', 'id')"><i class="remove"></i><font>删除</font></a>
    </div>
    <{if !empty($results)}>
    <div class="module mt5">
      <table class="datalist">
        <tr>
          <th width="50">编号</th>
          <th>名称</th>
          <th>开始时间</th>
          <th>失效时间</th>
          <th>满减金额</th>
          <th>优惠金额</th>
          <th>发行数量</th>
          <th>适用商品</th>
          <th>添加时间</th>
        </tr>
        <{foreach $results as $v}>
        <tr>
          <td width="20"><input name="id" type="checkbox" value="<{$v.id}>" /></td>
          <td width="30"><a class="blue" href="index.php?m=<{$MOD}>&c=goods_cate&a=voucheredit&id=<{$v.id}>"><{$v.vname}></a></td>
          <td width="30"><{date('Y-m-d', $v.start)}></td>
          <td width="30"><{date('Y-m-d', $v.end)}></td>
          <td width="30"><{$v.greater_than}></td>
          <td width="30"><{$v.amount}></td>
          <td width="30"><{$v.num}></td>
          <td width="30">
            <{if $v.goods_use == 0}>
            全场通用
            <{else}>
            <{foreach $v.goods_info as $vv}>
              <p><a class="blue" href="index.php?m=<{$MOD}>&c=goods&a=edit&id=<{$vv.goods_id}>"><{$vv.goods_name}></a></p>
            <{/foreach}>
            <{/if}>
          </td>
          <td width="30"><{date('Y-m-d H:i:s', $v.create_time)}></td>
        </tr>
        <{/foreach}>
      </table>
    </div>
    <{else}>
    <div class="nors mt5">未找到相关数据记录...</div>
    <{/if}>
  </div>
</div>
</body>
</html>
